package com.lzj.admin.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.lzj.admin.model.CountResultModel;
import com.lzj.admin.pojo.PurchaseList;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lzj.admin.query.PurchaseListQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 进货单 Mapper 接口
 * </p>
 *
 * @author luoyoumou
 * @date 2022-12-14
 */
public interface PurchaseListMapper extends BaseMapper<PurchaseList> {

    //查询下一个进货单号
    String getNextPurchaseNumber();

    IPage<PurchaseList>  purchaseList(IPage<PurchaseList> page,@Param("purchaseListQuery") PurchaseListQuery purchaseListQuery);

    //统计总数
    Long  countPurchaseTotal(@Param("purchaseListQuery") PurchaseListQuery purchaseListQuery);
    //统计当前页的列表
    List<CountResultModel>  countPurchaseList(@Param("purchaseListQuery") PurchaseListQuery purchaseListQuery);

}
